<?php

namespace App\Http\Modules;

/**
 * Created by PhpStorm.
 * User: thorjiang
 * Date: 2018/7/24
 * Time: 19:06
 */
class MicroMsgFactory
{
    /**
     * 工厂方法生成msg对象
     * @param $type
     * @return BaomingMsg|CanzhanMsg
     */
    public static function generate($type)
    {
        if ($type == \App\Models\UserMeeting::B) {
            return new BaomingMsg();
        } else {
            return new CanzhanMsg();
        }
    }
}
